import { h } from 'vue';
import { AdColumn } from '@/components/AdTable';
import { expandAndToString } from '@/utils/common';
import { BasicUpload } from '@/components/Upload';
import { TableImg } from '@/components/Table';
import { uploadApi, deleteApi } from '@/api/sys/upload';
import { FileInfo } from '@/components/Upload/src/typing';
import { ImageSelector } from '@/components/ImageSelector';
import { List } from '@/components/Linqts';
import { isArray, isNull, isObject, isString } from '@/utils/is';
import FileUpload from '/@/components/Form/src/components/FileUpload.vue';
import { debug } from 'console';

export const columns: AdColumn[] = [
  {
    title: '主键',
    dataIndex: 'Id',
    dataType: 'guid',
    width: 300,
    defaultHidden: true,
    filterable: false,
    sorter: true,
    formVisible: true,
    formEditable: false,
  },
  {
    title: '轮播图片',
    dataIndex: 'Imgs',
    dataType: 'upload',
    formVisible: true,
    formEditable: true,
    filterable: true,
    sorter: false,
    width: 300,
    align: 'center',
    formSchema: {
      componentProps: {
        accept: ['.png', '.jpg', '.gif', '.jpeg', '.bmp', '.ico'],
        maxSize: 10,
        maxNumber: 1,
      },
      rules: [
        {
          required: true,
          message: '请选择 图片格式文件',
        },
      ],
    },
  },
  {
    title: '排序号',
    dataIndex: 'OrderNo',
    dataType: 'number',
    width: 150,
    formVisible: true,
    formEditable: true,
    required: true,
    filterable: true,
    sorter: false,
  },
  {
    title: '创建时间',
    dataIndex: 'CreatedTime',
    dataType: 'datetime',
    width: 200,
    formVisible: true,
    formEditable: false,
    required: false,
    filterable: true,
    sorter: true,
  },
];

export interface InputDto {}

export interface OutputDto {}
